home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form2
- Caption = "Grid Example"
- ClientHeight = 3375
- ClientLeft = 900
- ClientTop = 2550
- ClientWidth = 8475
- Height = 3780
- Left = 840
- LinkTopic = "Form2"
- ScaleHeight = 3375
- ScaleWidth = 8475
- Top = 2205
- Width = 8595
- Begin SpinButton Spin2
- Height = 615
- Left = 6840
- Top = 480
- Width = 735
- End
- Begin SpinButton Spin1
- Height = 615
- Left = 4800
- Top = 480
- Width = 735
- End
- Begin CommandButton cmdReturn
- Caption = "Return"
- Height = 495
- Left = 4800
- TabIndex = 1
- Top = 1680
- Width = 1815
- End
- Begin Grid Grid1
- Cols = 3
- Height = 735
- Left = 600
- Rows = 3
- ScrollBars = 0 'None
- TabIndex = 0
- Top = 360
- Width = 3495
- End
- Begin Label Label2
- Caption = "Next/Prior Frame"
- Height = 255
- Left = 6840
- TabIndex = 3
- Top = 120
- Width = 1455
- End
- Begin Label Label1
- Caption = "Next/Prior Record"
- Height = 255
- Left = 4800
- TabIndex = 2
- Top = 120
- Width = 1695
- End
- Option Explicit
- Sub cmdReturn_Click ()
- Unload form2
- form1.Data1.Recordset.MoveFirst
- form1.Show
- End Sub
- Sub spin1_spindown ()
- Dim i As Integer
- On Error Resume Next
- 'First, try and move next. If we're currently on the last record
- 'EOF will be detected, so the code really can't advance next.
- 'So, just restore the position to the last record, beep, and
- 'get out of here.
- form1.Data1.Recordset.MoveNext
- If form1.Data1.Recordset.EOF Then
- Beep
- form1.Data1.Recordset.MoveLast
- Exit Sub
- End If
-
- 'Otherwise, back up, but not off the beginning of the database.
- For i = 1 To FRAME_SIZE - 1
- form1.Data1.Recordset.MovePrevious
- If form1.Data1.Recordset.BOF Then
- form1.Data1.Recordset.MoveFirst
- Exit For
- End If
- Next i
- 'Now that we're positioned on the correct record, display the frame.
- LoadFrame
- End Sub
- Sub Spin1_SpinUp ()
- Dim i As Integer
- On Error Resume Next
- For i = 1 To FRAME_SIZE
- form1.Data1.Recordset.MovePrevious
- If form1.Data1.Recordset.BOF Then
- Beep
- form1.Data1.Recordset.MoveFirst
- Exit For
- End If
- Next i
- LoadFrame
- End Sub
- Sub Spin2_SpinDown ()
- Dim i As Integer
- On Error Resume Next
- 'First, try and move next. If we're currently on the last record
- 'EOF will be detected, so the code really can't advance next.
- 'So, just restore the position to the last record, beep, and
- 'get out of here.
- form1.Data1.Recordset.MoveNext
- If form1.Data1.Recordset.EOF Then
- Beep
- form1.Data1.Recordset.MoveLast
- Exit Sub
- End If
-
- 'Now that we're positioned on the correct record, display the frame.
- LoadFrame
- End Sub
- Sub Spin2_SpinUp ()
- Dim i As Integer
- On Error Resume Next
- For i = 1 To FRAME_SIZE * 2 - 1
- form1.Data1.Recordset.MovePrevious
- If form1.Data1.Recordset.BOF Then
- Beep
- form1.Data1.Recordset.MoveFirst
- Exit For
- End If
- Next i
- LoadFrame
- End Sub
-